<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>广东国防教育学会</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" />
		<link rel="stylesheet" href="http://idangero.us/swiper/dist/css/swiper.min.css" />
		<link rel="stylesheet" href="/Public/Home/activity/css/style.css" />
	</head>
	<body>


		<div class="bar bar-nav">
			<h1 class="title">添加扫码人员</h1>
			<i class="icon icon-left" onclick="window.history.go(-1);"></i>
			
		</div>
		
		<style>
			.list-block.media-list .item-title{line-height:20px;}
			.list-block.media-list .item-title p{margin:0;}
			.item-title p.tel{color:#999;}
			.sign_search{background:#f1f1f1;padding:.5rem .5rem;}
		</style>
		
		<div class="content">
				<div class="row discuss sign_list no-border" id="order_1" style="margin-top:0;">
					
					<div class="col-100 sign_search text-center">
						<button class="prompt-ok button button-fill" style="margin:0 auto;width:100%;">添加</button>
					</div>
				<?php if(is_array($sweep)): foreach($sweep as $k=>$sweep): ?><div class="col-100">
					<div class="content-padded">
						<div class="list-block media-list" style="margin-top:0;">
							<ul>
								<li class="item-content">
									<div class="item-media">
										<img src="<?php echo ($sweep['head_img']); ?>" style="width:50px;height:50px;">
									</div>
									<div class="item-inner">
										<div class="item-title-row">
											<div class="item-title"><p><?php echo ($sweep['nickname']); ?></p><p class="tel">手机：<?php echo ($sweep['phone_number']); ?></p>
											 <p class="tel">时间：2017-09-08</p>
											</div>
											<button style="font-size: 12px;" class="button confirm-ok" sweep_id="<?php echo ($sweep['id']); ?>">删除</button>
										</div>
									</div>
								</li>
							</ul>
						</div>
					</div>
				</div><?php endforeach; endif; ?>
			</div>
			<?php if($sweep_show): ?><p id="load_more"> 暂无数据！</p><?php endif; ?>
		</div>


		<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
		<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script src="http://idangero.us/swiper/dist/js/swiper.min.js"></script>
		<script type="text/javascript" src="/Public/Home/activity/js/huodon.js" ></script>
		<script>
			
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				loop:true,    
				grabCursor: true,
				autoplay: 3000
			});
			
			 /* $(document).on('click','.open-preloader', function () {
				 Zepto.showPreloader('加载中...')
				    setTimeout(function () {
				    	 Zepto.hidePreloader();
				    }, 2000); 
			 }); */
			 $(document).on('click','.open-indicator', function () {
				 Zepto.showIndicator();
			     setTimeout(function () {
			    	Zepto.hideIndicator();
			     }, 2000);
			  });
		</script>
		

	</body>

</html>

		<script>
			Zepto(document).on('click','.prompt-ok', function () {
			      Zepto.prompt('请输入扫码人员的手机号码', function (value) {
			          //Zepto.alert('你当前的手机号码为"' + value + '"!');
			          window.location.href="/Users/addSweep/phone_number/"+value;
			      });
			  });
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true
			});
			
			 $(document).on('click','.confirm-ok', function () {
				 //alert($(this).parents('.user_order_card').attr('cl'));
				 //return false;
				 that = $(this);
				 var sweep_id = $(this).attr('sweep_id');
				 Zepto.confirm('你确定要该扫码人员吗?', function () {
					 delete_sweep(sweep_id, that);
			     });
			 });
			 
			 //异步发送
			 function delete_sweep(sweep_id, that){
				 $.ajax({
						type : "GET",
						//url:"/index.php?m=Mobile&c=User&a=collect_list&is_ajax=1&p="+page,//+tab,			
						url:"/Users/delete_sweep/sweep_id/"+sweep_id,//+tab,
//						data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
						success: function(data){
							if(data.status == 1){
								Zepto.alert(''+data.message+'');
								that.parents('.col-100').remove();
							}else{
								Zepto.alert(''+data.message+'');
							}
						}
					}); 
			 }
		</script>

	</body>

</html>